﻿@model StoreModel
@using Nop.Core.Domain.Media
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    Html.AddTitleParts(!String.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Name);
    Html.AddMetaDescriptionParts(Model.MetaDescription);
    Html.AddMetaKeywordParts(Model.MetaKeywords);

    var canonicalUrlsEnabled = EngineContext.Current.Resolve<Nop.Core.Domain.Seo.SeoSettings>().CanonicalUrlsEnabled;
    if (canonicalUrlsEnabled)
    {
        var storeUrl = Url.RouteUrl("Store", new { storeId = Model.Id, SeName = Model.SeName }, this.Request.Url.Scheme);
        Html.AddCanonicalUrlParts(storeUrl);
    }
}
@using Nop.Core;
@using Nop.Core.Domain.Common;
@using Nop.Core.Infrastructure;
@using Nop.Web;
@using Nop.Web.Framework.UI;
@using Nop.Web.Models.Catalog;
@using Nop.Web.Extensions;
<div class="store-page">
    <div class="store-header">
        <div class="breadcrumb">
            <ul>
                <li><a href="/">Top</a> <span class="delimiter">/</span></li>
                <li><strong><a href="@Model.StoreLink">@Model.Name</a></strong></li>
            </ul>
        </div>
    </div>
    <div class="sh-top-content slideshow">
        <div id="sh-slideshow">
            @Html.Action("Slideshow", "PictureDisplay", new { area = "Commerce", type = ((int)PictureDisplayType.StorePageTop), contentCategory = "Store", contentId = Model.Id })
                <div class="store-description">
            <div class="window">
                <div class="window-title grad-lightgrey grad">
                    <div class="window-title-bar  grad-titleshine grad">
                        <h1 class="section-title">
                            @Model.Name
                        </h1>
                        <div class="window-title-links hide">
                            @Html.ActionLink("Store Policy", "StoreAll", new { }, new { @class="button-grey"})
                            @{
                            //+string+    
                            }
                        </div>
                    </div>
                </div>
                <div class="window-content space">
                    @Html.Raw(Model.Description)
                    <div class="store-socialmedia-links">
                        @Html.Partial("_AddFavoriteStore", Model.Id)
                        @Html.Action("ShareButton", "Catalog")
                        
                    </div>
                    <div class="store-rating">
                        @Html.Action("StoreRating", "Catalog", new { area = "Commerce", currentStoreId = Model.Id })
                    </div>
                </div>

                
            </div>
        </div>
        </div>
        @*description*@

    </div>

    @*filtering
    @if (Model.PagingFilteringContext.PriceRangeFilter.Enabled)
    {
        <div class="product-filters">
            <div class="filter-title">
                <span>@T("Filtering.FilterResults")</span>
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterPriceBox", Model.PagingFilteringContext.PriceRangeFilter, new ViewDataDictionary())
            </div>
        </div>
        <div class="clear">
        </div>
    }*@

    <div class="clear-block">

    @*product list*@
    @if (Model.Products.Count > 0)
    {

        <h2 class="section-title">Products from @Model.Name</h2>
            /*
            <div class="window-title-links">
                <a href="/search?Store.Id=@Model.Id" class="button-grey">See More Products</a>
                @{
                //+string+    
                }
            </div>
                */
        <ul class="unordereddata">
            @foreach (var product in Model.Products)
            {
                <li><div class="panel-small panel">
                    @Html.Partial("_CustomProductBox", product)
                </div></li>
            }
        </ul>
        <div class="content-clear"></div>
            
    }
    
    
    @*TODO allow customer to select page size*@
    @*
    <div class="pager">
    @Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber")
    </div>
    *@


    @Html.Action("StoreLocationFrontPageInfo", "Catalog", new { area = "Commerce", currentStoreId = Model.Id })

    </div>
</div>
